package com.elderlyCare.controller.admin;

import com.elderlyCare.pojo.SensorDataDaily;
import com.elderlyCare.service.dataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/admin")
public class dataController {
    @Autowired
    private dataService dataService;

    @RequestMapping("/data")
    public List<SensorDataDaily> getData() {
        return dataService.getData();
    }

    @RequestMapping("/temperature")
    public List<String> getTemperature() {
        return dataService.getTemperature();
    }

    @RequestMapping("/humidity")
    public List<String> getHumidity() {
        return dataService.getHumidity();
    }

    @RequestMapping("/illumination")
    public List<String> getIllumination() {
        return dataService.getIllumination();
    }

    @RequestMapping("/oxygen")
    public List<String> getOxygen() {
        return dataService.getOxygen();
    }

    @RequestMapping("/carbonDioxide")
    public List<String> getCarbonDioxide() {
        return dataService.getCarbonDioxide();
    }

    @RequestMapping("/ultraviolet")
    public List<String> getUltraviolet() {
        return dataService.getUltraviolet();
    }

    @RequestMapping("/noise")
    public List<String> getNoise() {
        return dataService.getNoise();
    }

    @RequestMapping("/smoke")
    public List<String> getSmoke() {
        return dataService.getSmoke();
    }

    @RequestMapping("/acceleration")
    public List<String> getAcceleration() {
        return dataService.getAcceleration();
    }

    @RequestMapping("/combustible")
    public List<String> getCombustible() {
        return dataService.getCombustible();
    }
}
